﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入一个4位的正整数：");
            string input = Console.ReadLine();
            while (input.Length != 4)
         {
                Console.WriteLine("请输入一个4位的正整数：");
                input = Console.ReadLine();
            }
            Console.WriteLine("千位为" +input[0]+
                "百位为" +input[1]+
                "十位为" +input[2]+
                "个位为" +input[3]
                );
            Console.ReadKey();
        }

    }
}
